\ProvidesPackage{rails-handbook-cn}
\newcommand{\bookname}{一份不太入门的Ruby on Rails中文手册}
\newcommand{\inlinecode}{\texttt}

\usepackage{font-sets}
\usepackage[margin=80pt]{geometry}
\usepackage[colorlinks,linkcolor=red,anchorcolor=blue,citecolor=green]{hyperref}

\usepackage{titlesec}
\newpagestyle{main}{
  \sethead{\small\S\,\thesection\quad\sectiontitle}{\bookname}{$\cdot$~\thepage~$\cdot$}
  \setfoot{}{}{}\headrule\footrule}
\pagestyle{main}

\usepackage{listings}
\usepackage{xcolor}
\lstset{
  language=Ruby,
  numbers=left,
  numberstyle=\tiny,
  keywordstyle=\color{blue!70}, 
  commentstyle=\color{red!50!green!100!blue!50},
  rulesepcolor=\color{red!70!green!20!blue!20},
  breaklines=true,
  frame=shadowbox,
  escapeinside=``,
  xleftmargin=2em,
  xrightmargin=2em,
  aboveskip=1em,
  morekeywords={match,root,get,post,put,delete,resource,resources,controller,namespace},
  morestring=[b]",
  morestring=[b]'
}

\usepackage{makeidx}
\makeindex

% 关键字中文化
\renewcommand{\contentsname}{目录}
\renewcommand{\indexname}{索引}
\renewcommand{\bibname}{参考文献}
\renewcommand{\figurename}{图}
\renewcommand{\tablename}{表}

\title{\bookname}
\author{盛万章Ranmocy\thanks{mailto:Ranmocy@gmail.com}}
